package com.aidong.login.biz.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.aidong.login.biz.MemberLocationReportBiz;
import com.aidong.login.dao.MemberLocationReportDao;

@Service("locationReportBiz")
public class MemberLocationReportBizImpl implements MemberLocationReportBiz {
	
	private MemberLocationReportDao locationReportDao;

	@Autowired
	public void setLocationReportDao(MemberLocationReportDao locationReportDao) {
		this.locationReportDao = locationReportDao;
	}

	/**
	 * 报告我的位置坐标
	 */
	@Override
	public void editMyLocation(Map<String, Object> map) {
		locationReportDao.editMyLocation(map);
	}

	/**
	 * android版本更新
	 * @param versionNumber
	 * @return
	 */
	@Override
	public Map<String, Object> getAndroidVersion() {
		return locationReportDao.getAndroidVersion();
	}

	/**
	 * ios版本更新
	 * @param versionNumber
	 * @return
	 */
	@Override
	public Map<String, Object> getIosVersion() {
		return locationReportDao.getIosVersion();
	}

	/**
	 * 系统通知
	 * @return
	 */
	@Override
	public Map<String, Object> getMessageNotification(int idongId) {
		return locationReportDao.getMessageNotification(idongId);
	}

	/**
	 * 保存短信记录
	 * @param map
	 */
	@Override
	public void addMsmInfo(Map<String, Object> map) {
		locationReportDao.addMsmInfo(map);
	}

	/**
	 * 记录用户活跃度
	 */
	@Override
	public void addMemberLiveness(Map<String, Object> map) {
		locationReportDao.addMemberLiveness(map);
	}

	/**
	 * 记录使用活跃度
	 */
	@Override
	public void addFunctionUseLiveness(Map<String, Object> map) {
		locationReportDao.addFunctionUseLiveness(map);
	}

	/**
	 * 是否已有使用活跃记录
	 * @param map
	 * @return
	 */
	@Override
	public Map<String, Object> getFunctionUseCount(Map<String, Object> map) {
		return locationReportDao.getFunctionUseCount(map);
	}

	/**
	 * 修改使用活跃度
	 * @param map
	 */
	@Override
	public void editFunctionUseCount(Map<String, Object> map) {
		locationReportDao.editFunctionUseCount(map);
	}

	/**
	 * 广告位点击记录
	 * @param map
	 */
	@Override
	public void mstAdvertisingClick(Map<String, Object> map) {
		locationReportDao.mstAdvertisingClick(map);
	}

	/**
	 * 打开APP广告
	 * @return
	 */
	@Override
	public List<Map<String, Object>> getOpenAidongAppAv() {
		return locationReportDao.getOpenAidongAppAv();
	}
	/**
	 * 根据爱动ID查询出任务标签
	 * @param idongId
	 * @return
	 */
	@Override
	public Map<String, Object> getInfoByIdongId(int idongId) {
		return locationReportDao.getInfoByIdongId(idongId);
	}

	
	/**
	 * 根据爱动ID修改任务标签
	 * @param map
	 */
	@Override
	public void updateTaskByIdongId(Map<String, Object> map) {
		locationReportDao.updateTaskByIdongId(map);
	}
	/**
	 * 根据爱动ID查询出活动预约订单的数量
	 * @param idongId
	 * @return
	 */
	public int getCountCampaignSignOrder(int idongId){
		return locationReportDao.getCountCampaignSignOrder(idongId);
	}
}
